package HLLibClasses;

import HLCode.HLClassManager;
import HLCode.HLLibClass;
import HLCode.HLObject;
import HLLib.addressBook.HLAddressBook;
import HLLib.base.HLList;
import HLLib.base.HLString;

public class HLClassAddressBook extends HLLibClass {
    public HLClassAddressBook(HLClassManager owner) {
        super(owner);
    }

    public HLObject NewObject() {
        return new HLAddressBook();
    }

    public void StaticExecute(int index, HLObject args, HLObject resultOwnerObject, int resultIndex) {
        switch (index) {
        case 0: {
            if (resultOwnerObject == null) {
                HLAddressBook.GetAddressBook();
            } else {
                resultOwnerObject.SetObject(resultIndex, HLAddressBook.GetAddressBook());
            }
            break;
        }
        case 1: {
            HLAddressBook.SendMessage((HLList)args.GetObject(0), (HLString)args.GetObject(1), args.GetBoolean(0));
            break;
        }
        }
    }
}
